<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Mapping Hint Requests</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
MathJax = {
	tex: {
		inlineMath: '$', '$'], ['\\(', '\\)'
	},
	svg: {
		fontCache: 'global'
	}
};
</script>
<script type="text/javascript" id="MathJax-script" async
	src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>

<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Mapping Hint Requests' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../inform7n.html">Inform7</a></li><li><a href="index.html">if</a></li><li><a href="index.html#3">Chapter 3: Space and Time</a></li><li><b>Mapping Hint Requests</b></li></ul></div>
<p class="purpose">Special sentences giving layout or design hints on how to produce the World map in the index and an EPS map.</p>

<ul class="toc"><li><a href="3-mhr.html#SP1">&#167;1. Parsing sentences which set map parameters</a></li><li><a href="3-mhr.html#SP13">&#167;13. Offset notation</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Parsing sentences which set map parameters.</b>This happens in two passes: pass 1 before HTML mapping, pass 2 before EPS mapping.
</p>

<pre class="definitions code-font"><span class="definition-keyword">enum</span> <span class="constant-syntax">TRAVERSE_FOR_MAP1_SMFT</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::traverse_for_map_parameters</span><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">SyntaxTree::traverse</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::syntax_tree</span><span class="plain-syntax">(), </span><a href="3-mhr.html#SP1" class="function-link"><span class="function-syntax">MappingHints::look_for_map_parameters</span></a><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::look_for_map_parameters</span><span class="plain-syntax">(</span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">p</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">Node::get_type</span><span class="plain-syntax">(</span><span class="identifier-syntax">p</span><span class="plain-syntax">) == </span><span class="identifier-syntax">SENTENCE_NT</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">down</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">MajorNodes::try_special_meaning</span><span class="plain-syntax">(</span><span class="constant-syntax">TRAVERSE_FOR_MAP1_SMFT</span><span class="plain-syntax">, </span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">down</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">index_map_with_p</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::index_map_with_SMF</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">MappingHints::index_map_with_SMF</span></span>:<br/>The Map - <a href="3-tm.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">task</span><span class="plain-syntax">, </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">V</span><span class="plain-syntax">, </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> *</span><span class="identifier-syntax">NPs</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">OW</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">NPs</span><span class="plain-syntax">)?(</span><span class="identifier-syntax">NPs</span><span class="plain-syntax">[1]):</span><span class="identifier-syntax">EMPTY_WORDING</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">task</span><span class="plain-syntax">) { </span><span class="comment-syntax"> "Index map with ..."</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ACCEPT_SMFT:</span>
<span class="plain-syntax">            </span><span class="function-syntax">&lt;np-articled-list&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">OW</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">V</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRAVERSE_FOR_MAP1_SMFT:</span>
<span class="plain-syntax">            </span><a href="3-mhr.html#SP11" class="function-link"><span class="function-syntax">MappingHints::new_map_hint_sentence</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">V</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>This conveniently filters instance names to accept only those of kind
"direction".
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;direction-name&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;instance-of-object&gt;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>The subject noun phrase of sentences like this:
</p>

<blockquote>
    <p>Index map with Chamber mapped north of Cave and EPS file.</p>
</blockquote>

<p class="commentary">is an articled list of subjects (in this case, two of them); each subject
is parsed with the following grammar, which is almost a mini-language in
itself.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;index-map-sentence-subject&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">eps</span><span class="plain-syntax"> </span><span class="identifier-syntax">file</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;direction-name&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">mapped</span><span class="plain-syntax"> </span><span class="identifier-syntax">as</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;direction-name&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    ... </span><span class="identifier-syntax">mapped</span><span class="plain-syntax"> </span><span class="identifier-syntax">as</span><span class="plain-syntax"> ... |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;instance-of-object&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">mapped</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;map-positioning&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    ... </span><span class="identifier-syntax">mapped</span><span class="plain-syntax"> ... |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;map-setting&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">set</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;map-setting-value&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;map-setting&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">set</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> ... |</span>
<span class="plain-syntax">    ... </span><span class="identifier-syntax">set</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> ... |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">rubric</span><span class="plain-syntax"> {</span><span class="function-syntax">&lt;quoted-text-without-subs&gt;</span><span class="plain-syntax">} *** |</span>
<span class="plain-syntax">    ...</span>

<span class="function-syntax">&lt;map-positioning&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;instance-of-object&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">of</span><span class="plain-syntax">/</span><span class="identifier-syntax">from</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;instance-of-object&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">above</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;instance-of-object&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">below</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;instance-of-object&gt;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4_1" class="paragraph-anchor"></a><b>&#167;4.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Issue PM_MapDirectionClue problem</span><span class="named-paragraph-number">4.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapDirectionClue</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">index_map_with_p</span><span class="plain-syntax">, </span><span class="string-syntax">"You can only say 'Index map with D mapped as E.' "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"when D and E are directions."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">NO_IMW</span><span class="plain-syntax">, - };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP4">&#167;4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP4_2" class="paragraph-anchor"></a><b>&#167;4.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Issue PM_MapPlacement problem</span><span class="named-paragraph-number">4.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapPlacement</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">index_map_with_p</span><span class="plain-syntax">, </span><span class="string-syntax">"The map placement hint should either have the form 'Index map with X "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"mapped east of Y' or 'Index map with X mapped above/below Y'."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">NO_IMW</span><span class="plain-syntax">, - };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP4">&#167;4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP4_3" class="paragraph-anchor"></a><b>&#167;4.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Issue PM_MapSettingTooLong problem</span><span class="named-paragraph-number">4.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapSettingTooLong</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">index_map_with_p</span><span class="plain-syntax">, </span><span class="string-syntax">"The value supplied has to be a single item, a number, a word "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"or some text in double-quotes: this looks too long to be right."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">NO_IMW</span><span class="plain-syntax">, - };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP4">&#167;4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP4_4" class="paragraph-anchor"></a><b>&#167;4.4. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Issue PM_MapSettingOfUnknown problem</span><span class="named-paragraph-number">4.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP4_4_1" class="named-paragraph-link"><span class="named-paragraph">Actually issue PM_MapSettingOfUnknown problem</span><span class="named-paragraph-number">4.4.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">NO_IMW</span><span class="plain-syntax">, - };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP4">&#167;4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP4_5" class="paragraph-anchor"></a><b>&#167;4.5. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Issue PM_MapHintUnknown problem</span><span class="named-paragraph-number">4.5</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapHintUnknown</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">index_map_with_p</span><span class="plain-syntax">, </span><span class="string-syntax">"The general form for this is 'Index map with ...' and then a "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"list of clues, such as 'the Ballroom mapped east of the Terrace', "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"or 'room-size of the Ballroom set to 100'."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">NO_IMW</span><span class="plain-syntax">, - };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP4">&#167;4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::setting</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">MappingHints::setting</span></span>:<br/><a href="3-mhr.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">N</span><span class="plain-syntax"> == </span><span class="constant-syntax">NO_IMW</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="constant-syntax">SETTING_IMW</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>Now we parse the setting to be set. For example,
</p>

<blockquote>
    <p>title-size of the first room</p>
</blockquote>

<blockquote>
    <p>border-size of level 1</p>
</blockquote>

<blockquote>
    <p>room-outline-thickness of the Taj Mahal</p>
</blockquote>

<blockquote>
    <p>title-size</p>
</blockquote>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;map-setting&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;map-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">of</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;map-setting-scope&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;map-parameter&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    ... </span><span class="identifier-syntax">of</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;map-setting-scope&gt;</span>

<span class="function-syntax">&lt;map-setting-scope&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;definite-article&gt;</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;map-setting-scope-unarticled&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;map-setting-scope-unarticled&gt;</span>

<span class="function-syntax">&lt;map-setting-scope-unarticled&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">first</span><span class="plain-syntax"> </span><span class="identifier-syntax">room</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">level</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;cardinal-number&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;k-kind&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;instance-of-object&gt;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>The map parameters all have one-word, sometimes hyphenated, names, such
as the following:
</p>

<blockquote>
    <p>vertical-spacing, monochrome, annotation-size</p>
</blockquote>

<p class="commentary">For now, at least, these are all in English only.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;map-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Lexer::word_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">Wordings::length</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">) == </span><span class="constant-syntax">1</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">        ((</span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ConfigureIndexMap::get_map_variable_index_from_wchar</span><span class="plain-syntax">(</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax">))&gt;=0)) {</span>
<span class="plain-syntax">        ==&gt; { </span><span class="identifier-syntax">i</span><span class="plain-syntax">, </span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6_1" class="paragraph-anchor"></a><b>&#167;6.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Issue PM_MapSettingUnknown problem</span><span class="named-paragraph-number">6.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapSettingUnknown</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">index_map_with_p</span><span class="plain-syntax">, </span><span class="string-syntax">"The parameter has to be one of the fixed named set given in "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"the documentation, like 'room-name'. All parameters are one "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"word, but many are hyphenated. (Also, note that 'colour' has the "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"Canadian/English spelling, not the American one 'color'.)"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">NO_IMW</span><span class="plain-syntax">, - };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP6">&#167;6</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. </b>The value of map settings is as follows. In retrospect, the "booleans"
perhaps should just have been "true" and "false", not "on" and "off".
Never mind.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;map-setting-value&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;cardinal-number&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;quoted-text&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;map-setting-boolean&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;map-offset&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    ###</span>

<span class="function-syntax">&lt;map-setting-boolean&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">on</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">off</span>
</pre>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b>Map offsets have a cutesy notation: <span class="extract"><span class="extract-syntax">10&amp;-30</span></span>, for example, written as a
single word. The following nonterminal actually matches any single word
(so that problems can be caught later, not now), returning either a valid
offset or else the <span class="extract"><span class="extract-syntax">ERRONEOUS_OFFSET_VALUE</span></span> sentinel.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;map-offset&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="plain-syntax">    ==&gt; { </span><a href="3-mhr.html#SP13" class="function-link"><span class="function-syntax">MappingHints::parse_eps_map_offset</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">), - };</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. </b>The one part of the grammar not explicitly spelled out above was what to do
with the optional text which follows a rubric. This is a sequence of any of
the following:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;map-rubric&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">size</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;cardinal-number&gt;</span><span class="plain-syntax"> *** |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">font</span><span class="plain-syntax"> {</span><span class="function-syntax">&lt;quoted-text-without-subs&gt;</span><span class="plain-syntax">} *** |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">colour</span><span class="plain-syntax"> {</span><span class="function-syntax">&lt;quoted-text-without-subs&gt;</span><span class="plain-syntax">} *** |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">at</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;map-offset&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">from</span><span class="plain-syntax"> ... |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">at</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;map-offset&gt;</span><span class="plain-syntax"> ***</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. </b></p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">NO_IMW</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">EPSFILE_IMW</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">MAPPED_AS_IMW</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">MAPPED_IMW</span><span class="plain-syntax"> </span><span class="constant-syntax">3</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">SETTING_IMW</span><span class="plain-syntax"> </span><span class="constant-syntax">4</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">RUBRIC_IMW</span><span class="plain-syntax"> </span><span class="constant-syntax">5</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">RUBRIC_SIZE</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">RUBRIC_FONT</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">RUBRIC_COLOUR</span><span class="plain-syntax"> </span><span class="constant-syntax">3</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">RUBRIC_OFFSET</span><span class="plain-syntax"> </span><span class="constant-syntax">4</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">RUBRIC_POSITION</span><span class="plain-syntax"> </span><span class="constant-syntax">5</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">FIRST_ROOM_MAP_SCOPE</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">LEVEL_MAP_SCOPE</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">KIND_MAP_SCOPE</span><span class="plain-syntax"> </span><span class="constant-syntax">3</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">INSTANCE_MAP_SCOPE</span><span class="plain-syntax"> </span><span class="constant-syntax">4</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">ENTIRE_MAP_SCOPE</span><span class="plain-syntax"> </span><span class="constant-syntax">5</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::new_map_hint_sentence</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">MappingHints::new_map_hint_sentence</span></span>:<br/><a href="3-mhr.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">p</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Node::get_type</span><span class="plain-syntax">(</span><span class="identifier-syntax">p</span><span class="plain-syntax">) == </span><span class="identifier-syntax">AND_NT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-mhr.html#SP11" class="function-link"><span class="function-syntax">MappingHints::new_map_hint_sentence</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">down</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-mhr.html#SP11" class="function-link"><span class="function-syntax">MappingHints::new_map_hint_sentence</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">down</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">p</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">index_map_with_p</span><span class="plain-syntax"> = </span><span class="identifier-syntax">p</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="function-syntax">&lt;index-map-sentence-subject&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">Node::get_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">p</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;&lt;r&gt;&gt;</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EPSFILE_IMW:</span><span class="plain-syntax"> </span><span class="identifier-syntax">write_EPS_format_map</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MAPPED_AS_IMW:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP11_1" class="named-paragraph-link"><span class="named-paragraph">Parse "Index map with starboard mapped as east"-style sentences</span><span class="named-paragraph-number">11.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MAPPED_IMW:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP11_2" class="named-paragraph-link"><span class="named-paragraph">Parse "Index map with Ballroom mapped north of the Hallway"-style sentences</span><span class="named-paragraph-number">11.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SETTING_IMW:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP11_4" class="named-paragraph-link"><span class="named-paragraph">Parse "Index map with room size of Ballroom set to 72"-style sentences</span><span class="named-paragraph-number">11.4</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RUBRIC_IMW:</span>
<span class="plain-syntax">            </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP11_3" class="named-paragraph-link"><span class="named-paragraph">Parse "Index map with rubric "Here Be Dragons""-style sentences</span><span class="named-paragraph-number">11.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11_1" class="paragraph-anchor"></a><b>&#167;11.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse "Index map with starboard mapped as east"-style sentences</span><span class="named-paragraph-number">11.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::map_direction_as_if</span></a><span class="plain-syntax">(</span><span class="function-syntax">&lt;&lt;instance:x&gt;&gt;</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;&lt;instance:y&gt;&gt;</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP11">&#167;11</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP11_2" class="paragraph-anchor"></a><b>&#167;11.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse "Index map with Ballroom mapped north of the Hallway"-style sentences</span><span class="named-paragraph-number">11.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Instances::of_kind</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;&lt;instance:dir&gt;&gt;</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_direction</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapPlacementDirection</span><span class="plain-syntax">),</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="string-syntax">"The direction given as a hint for map placement wasn't "</span>
<span class="plain-syntax">            </span><span class="string-syntax">"one that I know of."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;instance:x&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I2</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;instance:y&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">exit</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;instance:dir&gt;&gt;</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">I</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) || (</span><a href="3-sm.html#SP7" class="function-link"><span class="function-syntax">Spatial::object_is_a_room</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapFromNonRoom</span><span class="plain-syntax">),</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="string-syntax">"The first-named thing must be a room (beware ambiguities!)."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">I2</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) || (</span><a href="3-sm.html#SP7" class="function-link"><span class="function-syntax">Spatial::object_is_a_room</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I2</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapToNonRoom</span><span class="plain-syntax">),</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="string-syntax">"The second-named thing must be a room (beware ambiguities!)."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">SpatialMap::direction_is_lateral</span><span class="plain-syntax">(</span><span class="identifier-syntax">MAP_DATA</span><span class="plain-syntax">(</span><span class="identifier-syntax">exit</span><span class="plain-syntax">)-&gt;</span><span class="element-syntax">direction_index</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapNonLateral</span><span class="plain-syntax">),</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="string-syntax">"The direction given as a hint for map placement must be "</span>
<span class="plain-syntax">            </span><span class="string-syntax">"a lateral direction (not up, down, above, below, inside "</span>
<span class="plain-syntax">            </span><span class="string-syntax">"or outside)."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::map_next_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">exit</span><span class="plain-syntax">, </span><span class="identifier-syntax">I2</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP11">&#167;11</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP11_3" class="paragraph-anchor"></a><b>&#167;11.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse "Index map with rubric "Here Be Dragons""-style sentences</span><span class="named-paragraph-number">11.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">RW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">GET_RW</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;index-map-sentence-subject&gt;</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">RESTW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">GET_RW</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;index-map-sentence-subject&gt;</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Word::dequote</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">RW</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">annotation</span><span class="plain-syntax"> =  </span><span class="identifier-syntax">Lexer::word_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">RW</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">point_size</span><span class="plain-syntax"> = </span><span class="constant-syntax">12</span><span class="plain-syntax">; </span><span class="comment-syntax"> 12-point type</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">font</span><span class="plain-syntax"> = </span><span class="identifier-syntax">U</span><span class="string-syntax">"&lt;font&gt;"</span><span class="plain-syntax">; </span><span class="comment-syntax"> meaning the default font</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">colour</span><span class="plain-syntax"> = </span><span class="identifier-syntax">U</span><span class="string-syntax">"000000"</span><span class="plain-syntax">; </span><span class="comment-syntax"> black</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">at_offset</span><span class="plain-syntax"> = </span><span class="constant-syntax">10001</span><span class="plain-syntax">; </span><span class="comment-syntax"> the offset </span>\((1, 1)\)
<span class="plain-syntax">    </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">offset_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">RESTW</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> &lt;= </span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">RESTW</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;map-rubric&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::from</span><span class="plain-syntax">(</span><span class="identifier-syntax">RESTW</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;edge&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;&lt;r&gt;&gt;</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RUBRIC_SIZE:</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">point_size</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;rsize&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RUBRIC_FONT:</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">Word::dequote</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;&lt;rfont&gt;&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">font</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Lexer::word_text</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;&lt;rfont&gt;&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RUBRIC_COLOUR:</span>
<span class="plain-syntax">                    </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP11_3_1" class="named-paragraph-link"><span class="named-paragraph">Make a rubric colour setting</span><span class="named-paragraph-number">11.3.1</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RUBRIC_OFFSET:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RUBRIC_POSITION:</span>
<span class="plain-syntax">                    </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP11_3_2" class="named-paragraph-link"><span class="named-paragraph">Make a rubric offset setting</span><span class="named-paragraph-number">11.3.2</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapBadRubric</span><span class="plain-syntax">),</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="string-syntax">"Unfortunately the details of that rubric seem to be "</span>
<span class="plain-syntax">                </span><span class="string-syntax">"in error (a lame message, but an accurate one)."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::make_rubric</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">annotation</span><span class="plain-syntax">, </span><span class="identifier-syntax">point_size</span><span class="plain-syntax">, </span><span class="identifier-syntax">font</span><span class="plain-syntax">, </span><span class="identifier-syntax">colour</span><span class="plain-syntax">, </span><span class="identifier-syntax">at_offset</span><span class="plain-syntax">, </span><span class="identifier-syntax">offset_from</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP11">&#167;11</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP11_3_1" class="paragraph-anchor"></a><b>&#167;11.3.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Make a rubric colour setting</span><span class="named-paragraph-number">11.3.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">Word::dequote</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;&lt;rcol&gt;&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">thec</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HTML::translate_colour_name</span><span class="plain-syntax">(</span><span class="identifier-syntax">Lexer::word_text</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;&lt;rcol&gt;&gt;</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">thec</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapUnknownColour</span><span class="plain-syntax">), </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="string-syntax">"There's no such map colour."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">colour</span><span class="plain-syntax"> = </span><span class="identifier-syntax">thec</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP11_3">&#167;11.3</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP11_3_2" class="paragraph-anchor"></a><b>&#167;11.3.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Make a rubric offset setting</span><span class="named-paragraph-number">11.3.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;&lt;roff&gt;&gt;</span><span class="plain-syntax"> == </span><span class="constant-syntax">ERRONEOUS_OFFSET_VALUE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapUnknownOffset</span><span class="plain-syntax">), </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="string-syntax">"There's no such offset."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">at_offset</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;roff&gt;&gt;</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;&lt;r&gt;&gt;</span><span class="plain-syntax"> == </span><span class="constant-syntax">RUBRIC_OFFSET</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">RW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Wordings::from</span><span class="plain-syntax">(</span><span class="identifier-syntax">Node::get_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">p</span><span class="plain-syntax">), </span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;instance-of-object&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">RW</span><span class="plain-syntax">)) </span><span class="identifier-syntax">I</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">RESTW</span><span class="plain-syntax">) + </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">I</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapUnknownOffsetBase</span><span class="plain-syntax">),</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="string-syntax">"There's no such room to be offset from."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">offset_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP11_3">&#167;11.3</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP11_4" class="paragraph-anchor"></a><b>&#167;11.4. </b>Finally, then, sentences which set parameters for the EPS map-maker.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse "Index map with room size of Ballroom set to 72"-style sentences</span><span class="named-paragraph-number">11.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax"> = </span><span class="constant-syntax">1000000</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">scope_I</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">kind</span><span class="plain-syntax"> *</span><span class="identifier-syntax">scope_k</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP11_4_1" class="named-paragraph-link"><span class="named-paragraph">Determine the scope for which the parameter is being set</span><span class="named-paragraph-number">11.4.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;inchar32_t:partext&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">index_of_parameter</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;parindex&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP11_4_2" class="named-paragraph-link"><span class="named-paragraph">Check that the value has the right type for this map parameter, and set it</span><span class="named-paragraph-number">11.4.2</span></a></span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP11">&#167;11</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP11_4_1" class="paragraph-anchor"></a><b>&#167;11.4.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Determine the scope for which the parameter is being set</span><span class="named-paragraph-number">11.4.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">bad_scope</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;&lt;scoping&gt;&gt;</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">FIRST_ROOM_MAP_SCOPE:</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">first</span><span class="plain-syntax"> = </span><a href="3-sm.html#SP42" class="function-link"><span class="function-syntax">Spatial::get_benchmark_room</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">first</span><span class="plain-syntax">) </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax"> = </span><span class="identifier-syntax">first</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">LEVEL_MAP_SCOPE:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;level&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">KIND_MAP_SCOPE:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;kind:kscope&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Kinds::Behaviour::is_subkind_of_object</span><span class="plain-syntax">(</span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">                ((</span><span class="identifier-syntax">Kinds::Behaviour::is_object_of_kind</span><span class="plain-syntax">(</span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_room</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax">                    (</span><span class="identifier-syntax">Kinds::Behaviour::is_object_of_kind</span><span class="plain-syntax">(</span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_region</span><span class="plain-syntax">)))) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">SPATIAL_MAP</span><span class="plain-syntax">, </span><span class="string-syntax">"Setting for kind %u\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">bad_scope</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INSTANCE_MAP_SCOPE:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="3-sm.html#SP7" class="function-link"><span class="function-syntax">Spatial::object_is_a_room</span></a><span class="plain-syntax">(</span><span class="function-syntax">&lt;&lt;instance:iscope&gt;&gt;</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax">                (</span><a href="3-rgn.html#SP9" class="function-link"><span class="function-syntax">Regions::object_is_a_region</span></a><span class="plain-syntax">(</span><span class="function-syntax">&lt;&lt;instance:iscope&gt;&gt;</span><span class="plain-syntax">)))</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;instance:iscope&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">SPATIAL_MAP</span><span class="plain-syntax">, </span><span class="string-syntax">"Setting for object $O\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">bad_scope</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ENTIRE_MAP_SCOPE:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax"> = </span><span class="identifier-syntax">K_room</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">bad_scope</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-mhr.html#SP4_4_1" class="named-paragraph-link"><span class="named-paragraph">Actually issue PM_MapSettingOfUnknown problem</span><span class="named-paragraph-number">4.4.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP11_4">&#167;11.4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP4_4_1" class="paragraph-anchor"></a><b>&#167;4.4.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Actually issue PM_MapSettingOfUnknown problem</span><span class="named-paragraph-number">4.4.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::map_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapSettingOfUnknown</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">index_map_with_p</span><span class="plain-syntax">, </span><span class="string-syntax">"The parameter has to be 'of' either 'the first room' "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"or a specific named room (beware ambiguities!) or "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"a level such as 'level 0' (the first room is by "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"definition on level 0), or a region, or a kind of room."</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP4_4">&#167;4.4</a> and <a href="3-mhr.html#SP11_4_1">&#167;11.4.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP11_4_2" class="paragraph-anchor"></a><b>&#167;11.4.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Check that the value has the right type for this map parameter, and set it</span><span class="named-paragraph-number">11.4.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">type_wanted</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ConfigureIndexMap::type_of_parameter</span><span class="plain-syntax">(</span><span class="identifier-syntax">index_of_parameter</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">type_found</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;msvtype&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">i_wanted_a</span><span class="plain-syntax"> = </span><span class="string-syntax">""</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">wn</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;msword&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax">(</span><span class="identifier-syntax">type_wanted</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INT_MDT:</span><span class="plain-syntax"> </span><span class="identifier-syntax">i_wanted_a</span><span class="plain-syntax"> = </span><span class="string-syntax">"an integer"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type_found</span><span class="plain-syntax"> == </span><span class="identifier-syntax">INT_MDT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::put_mp</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;&lt;msvalue&gt;&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">OFF_MDT:</span><span class="plain-syntax"> </span><span class="identifier-syntax">i_wanted_a</span><span class="plain-syntax"> = </span><span class="string-syntax">"an offset in the form 34&amp;-450"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type_found</span><span class="plain-syntax"> == </span><span class="identifier-syntax">OFF_MDT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::put_mp</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;&lt;msvalue&gt;&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BOOL_MDT:</span><span class="plain-syntax"> </span><span class="identifier-syntax">i_wanted_a</span><span class="plain-syntax"> = </span><span class="string-syntax">"'on' or 'off'"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type_found</span><span class="plain-syntax"> == </span><span class="identifier-syntax">BOOL_MDT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::put_mp</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;&lt;msvalue&gt;&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">TEXT_MDT:</span><span class="plain-syntax"> </span><span class="identifier-syntax">i_wanted_a</span><span class="plain-syntax"> = </span><span class="string-syntax">"some text in double-quotes"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type_found</span><span class="plain-syntax"> == </span><span class="identifier-syntax">TEXT_MDT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Word::dequote</span><span class="plain-syntax">(</span><span class="identifier-syntax">wn</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::put_mp</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">Lexer::word_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">wn</span><span class="plain-syntax">), </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">FONT_MDT:</span><span class="plain-syntax"> </span><span class="identifier-syntax">i_wanted_a</span><span class="plain-syntax"> = </span><span class="string-syntax">"a font name in double-quotes"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type_found</span><span class="plain-syntax"> == </span><span class="identifier-syntax">TEXT_MDT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Word::dequote</span><span class="plain-syntax">(</span><span class="identifier-syntax">wn</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::put_mp</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">Lexer::word_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">wn</span><span class="plain-syntax">), </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">COL_MDT:</span><span class="plain-syntax"> </span><span class="identifier-syntax">i_wanted_a</span><span class="plain-syntax"> = </span><span class="string-syntax">"a colour name in double-quotes"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type_found</span><span class="plain-syntax"> == </span><span class="identifier-syntax">TEXT_MDT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Word::dequote</span><span class="plain-syntax">(</span><span class="identifier-syntax">wn</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">col</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HTML::translate_colour_name</span><span class="plain-syntax">(</span><span class="identifier-syntax">Lexer::word_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">wn</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">col</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                    </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::put_mp</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">parameter_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">col</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">default:</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"Unexpected map parameter data type"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::map_problem_wanted_but</span><span class="plain-syntax">(</span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_MapSettingTypeFailed</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">p</span><span class="plain-syntax">, </span><span class="identifier-syntax">i_wanted_a</span><span class="plain-syntax">, </span><span class="identifier-syntax">wn</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-mhr.html#SP11_4">&#167;11.4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP12" class="paragraph-anchor"></a><b>&#167;12. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">mapping_hint</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">from</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">to</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">dir</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">as_dir</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">put_string</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">put_integer</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">annotation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">point_size</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">font</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">colour</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">at_offset</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">offset_from</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">mapping_hint</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">mapping_hint</span><span class="plain-syntax"> *</span><span class="function-syntax">MappingHints::new_hint</span><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">mapping_hint</span><span class="plain-syntax"> *</span><span class="identifier-syntax">hint</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">mapping_hint</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">to</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">as_dir</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">scope_level</span><span class="plain-syntax"> = </span><span class="constant-syntax">1000000</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">scope_I</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">put_string</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">put_integer</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">annotation</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">point_size</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">font</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">colour</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">at_offset</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">offset_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">hint</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::map_direction_as_if</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">MappingHints::map_direction_as_if</span></span>:<br/><a href="3-mhr.html#SP11_1">&#167;11.1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I2</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">mapping_hint</span><span class="plain-syntax"> *</span><span class="identifier-syntax">hint</span><span class="plain-syntax"> = </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::new_hint</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I</span><span class="plain-syntax">; </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">as_dir</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::map_next_to</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">MappingHints::map_next_to</span></span>:<br/><a href="3-mhr.html#SP11_2">&#167;11.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">exit</span><span class="plain-syntax">, </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I2</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">mapping_hint</span><span class="plain-syntax"> *</span><span class="identifier-syntax">hint</span><span class="plain-syntax"> = </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::new_hint</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir</span><span class="plain-syntax"> = </span><span class="identifier-syntax">exit</span><span class="plain-syntax">; </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I</span><span class="plain-syntax">; </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">to</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::obj_in_region</span><span class="plain-syntax">(</span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">reg</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">I</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">reg</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-rgn.html#SP7" class="function-link"><span class="function-syntax">Regions::enclosing</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">) == </span><span class="identifier-syntax">reg</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::obj_in_region</span></a><span class="plain-syntax">(</span><a href="3-rgn.html#SP7" class="function-link"><span class="function-syntax">Regions::enclosing</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">), </span><span class="identifier-syntax">reg</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::put_mp</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">MappingHints::put_mp</span></span>:<br/><a href="3-mhr.html#SP11_4_2">&#167;11.4.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">name</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">kind</span><span class="plain-syntax"> *</span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">, </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">put_string</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">put_integer</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-rgn.html#SP9" class="function-link"><span class="function-syntax">Regions::object_is_a_region</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">rm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOOP_OVER_INSTANCES</span><span class="plain-syntax">(</span><span class="identifier-syntax">rm</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_room</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::obj_in_region</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">rm</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                    </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::put_mp</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">name</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">rm</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="identifier-syntax">put_string</span><span class="plain-syntax">, </span><span class="identifier-syntax">put_integer</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-sm.html#SP7" class="function-link"><span class="function-syntax">Spatial::object_is_a_room</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOOP_OVER_INSTANCES</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_k</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::put_mp</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">name</span><span class="plain-syntax">, </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="identifier-syntax">put_string</span><span class="plain-syntax">, </span><span class="identifier-syntax">put_integer</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">mapping_hint</span><span class="plain-syntax"> *</span><span class="identifier-syntax">hint</span><span class="plain-syntax"> = </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::new_hint</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">scope_level</span><span class="plain-syntax"> = </span><span class="identifier-syntax">scope_level</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">scope_I</span><span class="plain-syntax"> = </span><span class="identifier-syntax">scope_I</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">put_string</span><span class="plain-syntax"> = </span><span class="identifier-syntax">put_string</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">put_integer</span><span class="plain-syntax"> = </span><span class="identifier-syntax">put_integer</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::make_rubric</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">MappingHints::make_rubric</span></span>:<br/><a href="3-mhr.html#SP11_3">&#167;11.3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">annotation</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">point_size</span><span class="plain-syntax">, </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">font</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> *</span><span class="identifier-syntax">colour</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">at_offset</span><span class="plain-syntax">, </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">offset_from</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">mapping_hint</span><span class="plain-syntax"> *</span><span class="identifier-syntax">hint</span><span class="plain-syntax"> = </span><a href="3-mhr.html#SP12" class="function-link"><span class="function-syntax">MappingHints::new_hint</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">annotation</span><span class="plain-syntax"> = </span><span class="identifier-syntax">annotation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">point_size</span><span class="plain-syntax"> = </span><span class="identifier-syntax">point_size</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">font</span><span class="plain-syntax"> = </span><span class="identifier-syntax">font</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">colour</span><span class="plain-syntax"> = </span><span class="identifier-syntax">colour</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">at_offset</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at_offset</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">hint</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">offset_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">offset_from</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<ul class="endnotetexts"><li>The structure mapping_hint is accessed in 2/bd, 3/sm, 3/tp, 3/bck, 3/rgn, 3/tm, 3/scn, 3/ts, 5/pp, 5/ts, 6/dlg and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP13" class="paragraph-anchor"></a><b>&#167;13. Offset notation.</b>The offset parameter \((x, y)\) is stored as the integer \(10000y + x\). Except
for the error value, we are required to have \(-9999 \leq x, y \leq 9999\), and
the syntax to specify this is two literal numbers divided by an ampersand.
For instance, <span class="extract"><span class="extract-syntax">28&amp;-125</span></span> means \((28, -125)\) which is stored as \(-1249972\).
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">ERRONEOUS_OFFSET_VALUE</span><span class="plain-syntax"> </span><span class="constant-syntax">100000000</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">MappingHints::parse_eps_map_offset</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">MappingHints::parse_eps_map_offset</span></span>:<br/><a href="3-mhr.html#SP9">&#167;9</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">offs</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">offs</span><span class="plain-syntax">, </span><span class="string-syntax">"%W"</span><span class="plain-syntax">, </span><span class="identifier-syntax">Wordings::one_word</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">offs</span><span class="plain-syntax">) &gt;= </span><span class="constant-syntax">30</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="constant-syntax">ERRONEOUS_OFFSET_VALUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">match_results</span><span class="plain-syntax"> </span><span class="identifier-syntax">mr</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Regexp::create_mr</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">xbit</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">ybit</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">offs</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"(%c*?)&amp;(%c*)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">xbit</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::atoi</span><span class="plain-syntax">(</span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], </span><span class="constant-syntax">0</span><span class="plain-syntax">), </span><span class="identifier-syntax">ybit</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::atoi</span><span class="plain-syntax">(</span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="constant-syntax">ERRONEOUS_OFFSET_VALUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">offs</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">xbit</span><span class="plain-syntax"> + </span><span class="identifier-syntax">ybit</span><span class="plain-syntax">*10000;</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-ts.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-im.html">1</a></li><li class="progresschapter"><a href="2-bd.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-sm.html">sm</a></li><li class="progresssection"><a href="3-enah.html">enah</a></li><li class="progresssection"><a href="3-sr.html">sr</a></li><li class="progresssection"><a href="3-si.html">si</a></li><li class="progresssection"><a href="3-prs.html">prs</a></li><li class="progresssection"><a href="3-tp.html">tp</a></li><li class="progresssection"><a href="3-dvc.html">dvc</a></li><li class="progresssection"><a href="3-bck.html">bck</a></li><li class="progresssection"><a href="3-rgn.html">rgn</a></li><li class="progresssection"><a href="3-tm.html">tm</a></li><li class="progresssection"><a href="3-mcr.html">mcr</a></li><li class="progresssection"><a href="3-tr.html">tr</a></li><li class="progresssection"><a href="3-scn.html">scn</a></li><li class="progresssection"><a href="3-ts.html">ts</a></li><li class="progresscurrent">mhr</li><li class="progresschapter"><a href="4-ap.html">4</a></li><li class="progresschapter"><a href="5-pp.html">5</a></li><li class="progresschapter"><a href="6-dlg.html">6</a></li><li class="progressnext"><a href="4-ap.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

